package com.peng.appcommonlib;

import android.content.Context;
import android.widget.TextView;

import com.peng.commonlibrary.allkindsoflist.linearlayoutlist.ListBaseAdapter;
import com.peng.commonlibrary.allkindsoflist.common.SuperViewHolder;
import com.peng.commonlibrary.allkindsoflist.model.ItemModel;

/**
 * Created by M_genius on 2018/1/29 15:20.
 * 描述：
 */

public class DataAdapter extends ListBaseAdapter<ItemModel> {

    public DataAdapter(Context context) {
        super(context);
    }

    @Override
    public int getLayoutId() {
        return R.layout.sample_item_text;
    }

    @Override
    public void onBindItemHolder(SuperViewHolder holder, int position) {
        ItemModel item = mDataList.get(position);
        TextView titleText = holder.getView(R.id.info_text);
        titleText.setText(item.title);
    }
}